/**
 *
 * @author Amr
 */
public class SimpleNode {
    private SimpleNode parent;
    private String value;
    private String givenInput;
    private SimpleNode[] children;
    private int childrenNum;
    /**
    * The constructor of the class.
    * @param the parent node, array of children and the current value.
    */
    public SimpleNode(SimpleNode newParent,String newValue,String newInput,int newChildrenNum) {
        parent=newParent;
        value=newValue;
        givenInput=newInput;
        childrenNum=newChildrenNum;
        children=new SimpleNode[childrenNum];
    }
	/**
	 * @return the parent
	 */
	public SimpleNode getParent() {
		return parent;
	}
	/**
	 * @param parent the parent to set
	 */
	public void setParent(SimpleNode parent) {
		this.parent = parent;
	}
	/**
	 * @return the value
	 */
	public String getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}
	/**
	 * @return the givenInput
	 */
	public String getGivenInput() {
		return givenInput;
	}
	/**
	 * @param givenInput the givenInput to set
	 */
	public void setGivenInput(String givenInput) {
		this.givenInput = givenInput;
	}
	/**
	 * @return the children
	 */
	public SimpleNode getChild(int input) {
		return this.children[input];
	}
	/**
	 * @param children the children to set
	 */
	public void setChild(SimpleNode child,int input) {
		this.children[input]=child;
	}
	/**
	 * @return the childrenNum
	 */
	public int getChildrenNum() {
		return childrenNum;
	}
	/**
	 * @param childrenNum the childrenNum to set
	 */
	public void setChildrenNum(int childrenNum) {
		this.childrenNum = childrenNum;
	}
	
    
}
